package main

import "fmt"

// 我的选品库的列表 在我的淘宝联盟账号中   只是个列表
func TbkUatmFavorites() {
	postParm := make(map[string]interface{},9)
	postParm = map[string]interface{}{
		"method":    "taobao.tbk.uatm.favorites.get",
		"page_no":   1,
		"page_size": 20,
		"fields":    "favorites_title,favorites_id,type",
	}
	fmt.Println(TopApi(postParm))
}

// 后台类目ID
/*func taobaoItemcatsGet(){

}*/

// 好券清单
func tbkDgItemCoupon() {
	postParm := make(map[string]interface{},12)
	postParm = map[string]interface{}{
		"adzone_id": "487450089",
		"platform":  1,
		"cat":       "16,18",
		"page_size": 20,
		"q":         "女装",
		"page_no":   1,
		"method":    "taobao.tbk.dg.item.coupon.get",
	}
	fmt.Println(TopApi(postParm))
}

// 淘口令
func TbkTpwd() {
	postParm := make(map[string]interface{},11)
	postParm = map[string]interface{}{
		"method":  "taobao.tbk.tpwd.create",
		"user_id": 12313,
		"text":    "这个是什么东东",
		"url":     "https://detail.m.tmall.com/item.htm?id=xxx",
		"logo":    "https://img.alicdn.com/tfscom/i2/TB1ZrhHMpXXXXcfXXXXXXXXXXXX_!!0-item_pic.jpg",
		"ext":     `{"id":123,"username":"jmz"}`,
	}
	fmt.Println(TopApi(postParm))
}

// 淘宝客商品查询
func TbkItem() {
	postParm := make(map[string]interface{},12)
	postParm = map[string]interface{}{
		"method":    "taobao.tbk.item.get",
		"fields":    "num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url,seller_id,volume,nick",
		"q":         "女装",
		"cat":       "16,18",
		"itemloc":   "杭州",
		"sort":      "tk_rate_des",
		"page_size": 10,
	}
	fmt.Println(TopApi(postParm))
}
